package com.shop.daoImpl;

import java.util.Set;

import com.shop.dao.OrderDao;
import com.shop.entity.MerchantOrder;
import com.shop.entity.Order;
/**
 * 
 * <b>一句话描述该类<b>
 * <pre>
 * 对会员order的操作必须由会员来完成
 * </pre>
 * @author 威 
 * <br>2018年1月4日 下午4:15:11 
 *
 */
public class OrderDaoImpl extends BaseDaoImpl<Order> implements OrderDao {
	
	
	public OrderDaoImpl() {
		super(Order.class) ;
	}

	@Override
	public Set<MerchantOrder> findmerchantOrders(Order order) {
		return order.getMerchantOrders() ;
	}

	@Override
	public boolean saveMerchantOrder(Order order, MerchantOrder morder) {
		order.getMerchantOrders().add(morder) ;
		getSession().save(order) ;
		return true ;
	}

}
